import type { SelectOption } from '../select/types'

export interface RangeSliderProps {
  id: string
  label: string
  value: number
  min: number
  max: number
  step?: number
  title?: string
  onChange?: (value: number) => void
  showValue?: boolean
  precision?: number // 精度控制
  valueFormatter?: (sliderValue: number, selectValue?: string) => string // 格式化函数
  disabled?: boolean
  selectOptions?: {
    id: string
    label?: string
    options: SelectOption[]
    selectedValue: string
    onChange?: (value: string | undefined) => void
  }
}

export const DEFAULT_RANGE_SLIDER_PROPS: Partial<RangeSliderProps> = {
  label: '请选择',
  showValue: true,
  title: '',
  step: 1, // 默认步长为1
  disabled: false,
}
